package com.smart.wap.bodys;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Administrator
 */

@Data
public class ShopBody {


    /**
     * 卖猪表单
     * @author leo
     * @date 2023/09/21
     */
    @Data
    @Accessors(chain = true)
    public static class EditBody implements Serializable {

        @ApiModelProperty(value = "猪猪商品code", required = true)
        @NotBlank(message = "猪猪商品code 不能为空")
        @Length( max = 30,message = "猪猪不能超过 30个字符")
        private String code;

        @ApiModelProperty(value = "赠送才填写_赠送人ID(必须是好友)", required = true)
        private Long friends;

        @ApiModelProperty(value = "是否钻石支付")
        private Boolean isMedal = false;

        @ApiModelProperty(value = "抵扣代码(背包中获取)")
        private String medalCode;

        @ApiModelProperty(value = "是否兑换")
        private Boolean isExchange = false;

        @ApiModelProperty(value = "是否全额")
        private Boolean isFull = false;

        @ApiModelProperty(value = "兑换码")
        private String redeemCodes;

    }

    @Data
    @Accessors(chain = true)
    public static class ExchangeBody implements Serializable {

        @ApiModelProperty(value = "猪猪商品code", required = true)
        @NotBlank(message = "猪猪商品code 不能为空")
        @Length( max = 30,message = "猪猪不能超过 30个字符")
        private String code;

        @ApiModelProperty(value = "兑换码", required = true)
        private String redeemCodes;

    }

    /**
     * 购买套餐
     * @author Leo
     * @date 2023/10/05
     */
    @Data
    @Accessors(chain = true)
    public static class GoodsPigBody implements Serializable {

        @ApiModelProperty(value = "商品编码", required = true)
        @NotBlank(message = "商品编码 不能为空")
        @Length( max = 30,message = "商品编码 30个字符")
        private String code;

        @ApiModelProperty(value = "猪猪代码", required = true)
        @NotBlank(message = "猪猪代码 不能为空")
        @Length( max = 30,message = "猪猪代码 30个字符")
        private String codePig;

        @ApiModelProperty(value = "购买天数", required = true)
        @NotNull(message = "购买天数 不能为空")
        @Min(value = 1,message = "天数不能小于1")
        private Integer number;
    }

    /**
     * 兑换零食
     * @author leo
     * @date 2023/10/13
     */
    @Data
    @Accessors(chain = true)
    public static class GoodsBody implements Serializable {

        @ApiModelProperty(value = "零食编码", required = true)
        @NotBlank(message = "零食编码 不能为空")
        @Length( max = 30,message = "零食编码 30个字符")
        private String code;

        @ApiModelProperty(value = "购买数量" , required = true)
        @NotNull(message = "购买数量 不能为空")
        @Min(value = 1,message = "购买数量不能小于 1")
        private Integer number ;

    }

    @Data
    @Accessors(chain = true)
    public static class ServeBody implements Serializable {

        @ApiModelProperty(value = "服务编码", required = true)
        @NotBlank(message = "服务编码 不能为空")
        @Length( max = 30,message = "服务编码 30个字符")
        private String code;

        @ApiModelProperty(value = "使用的猪仔" , required = true)
        @NotBlank(message = "使用的猪仔 不能为空")
        private String codePig ;

    }




}
